package com.tiancheng.onecode.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.tiancheng.onecode.entity.PlatformMerchantSettleRule;

import java.util.List;
import java.util.Set;

/**
 * @Author: kellen
 * @Description: 商户清分规则表 service
 * @Date: create in 2024/12/13 15:46
 */
public interface IPlatformMerchantSettleRuleService extends IService<PlatformMerchantSettleRule> {
    /**
     * 增 - 新增即生效，同时把旧规则失效
     *
     * @return {@link Boolean}
     */
    Boolean addRule(PlatformMerchantSettleRule rule);

    /**
     * 修改清分规则
     * @param rule
     * @return
     */
    Boolean updateRule(PlatformMerchantSettleRule rule);

    /**
     * 停用清分规则
     * @param ruleCode
     */
    void deactivateSettlement(String ruleCode);

    /**
     * 根据规则编码查询
     * @param ruleCode
     * @return
     */
    PlatformMerchantSettleRule queryByCode(String ruleCode);
    List<PlatformMerchantSettleRule> queryByCodes(Set<String> ruleCodes);

    PlatformMerchantSettleRule currentRule(Long platformMerchantId);

}
